<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Vue.extend的简写</title>
    <!-- 引入Vue -->
    <script type="text/javascript" src="../../js/vue.js"></script>
    <style>
      .person {
        background-color: skyblue;
        padding: 20px;
      }
      .school {
        background-color: skyblue;
        padding: 20px;
      }
    </style>
  </head>
  <body>
    <!-- 准备好一个容器-->
    <div id="demo"></div>

    <script type="text/javascript">

      const Person = {
        name:'Person',
        template:`
          <div class="person">
            <h2>我的名字是：{{name}}</h2>  
          </div>
        `,
        data(){
          return {
            name:'强哥'
          }
        }
      }
      console.log(Person)

      new Vue({
        el:'#demo',
        template:`<Person/>`,
        components:{Person}
      })


    </script>
  </body>
</html>